package uk.ac.bath.machine.tristate;

import uk.ac.bath.base.Operator;
import uk.ac.bath.base.VectorState;
import java.io.*;

public class Link extends Operator {

    public void tick(VectorState in, VectorState out) {
        out.at(0).set(in.at(1));
    }

    public void tick(VectorState in, VectorState out, int map[]) {
        out.v[map[0]].set(in.v[map[1]]);
    }

    public int getStateSize() {
        return 2;
    }

    public int getParamSize() {
        return 0;
    }

    public int nIn() {
        return 1;
    }

    public int nOut() {
        return 1;
    }

    public Object clone() {
        return this;   //OK no state
    }

    public void toString(StringWriter w) {
        w.write("Link ");
    }
}
